import { axios } from '@/utils/request'

export function register (params) {
  return axios({
    url: '/experiment/register',
    method: 'post',
    data: params
  })
}
// 获取统一认证地址
export function getAuthDomain (params) {
  return axios({
    url: '/uniauth/domain',
    method: 'get',
    params
  })
}
export function verifyToken (params) {
  return axios({
    url: '/auth/verifyCode',
    method: 'get',
    params
  })
}

export function login (params) {
  return axios({
    url: '/experiment/getToken',
    method: 'post',
    params
  })
}

export function getInfo () {
  return axios({
    url: '/ac/users/user',
    method: 'get'
  })
}

export function getCurrentUserNav (token) {
  return axios({
    url: '/user/nav',
    method: 'get'
  })
}

export function logout () {
  return axios({
    url: '/ac/authentication/session',
    method: 'delete'
  })
}
